﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

using HappyDining.HPDNServiceReference;
using HappyDining.MyUserControls;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace HappyDining
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class TableViewTestPage1 : Page
    {
        public TableViewTestPage1()
        {
            this.InitializeComponent();
            
            List<Table> tablesList = new List<Table>();
            Table tb1 = new Table();
            tb1.Id = 1;
            tb1.TableName = "Table 01";
            tb1.Status = 0;

            Item item1 = new Item();
            item1.Name = "Nem công chả phượng và đây sẽ là một cái tên khá là dài và dài dài rất dài vì tôi muốn xem nếu dòng chữ rất dài thì layout sẽ như thế nào";

            BillDetails bd1 = new BillDetails();
            bd1.Item = item1;
            bd1.Count = 2;
            bd1.Price = 200;

            tablesList.Add (tb1);

            //MyUserControl1 myUserControl = null;
            for (int i = 1; i < 50; i++)
            {

                //MyUserControl1 myUserControl = new MyUserControl1(tb1);
                ChiTietHoaDonUserControl chitietControl = new ChiTietHoaDonUserControl(bd1);
                contentStackPanel.Children.Add(chitietControl);
            }
                
        }
    }
}
